{	Problem: http://codeforces.ru/problemset/problem/103/C
	Verdict: Accepted
}
uses
    SysUtils, Math;

const
    CD = '.';
    CX = 'X';

var
    n,k,p,x,x1,x2:int64;
    i:longint;

begin 
read(n,k,p);
x1 := max(0, n - 2 * k);
x2 := 2 * min(k, n - k);
if odd(x1) and (x2 > 0) then begin
    inc(x1);
    dec(x2,2);
end;
for i:=1 to p do begin
    read(x);
    dec(x);
    if x < x1 then write(CD) else
    if x < x1 + x2 then begin
        if odd(x - x1) then write(CX) else write(CD);
    end else write(CX);
end;
end.